# -*- coding = utf-8 -*-
# @Time : 2022/2/16 19:49
# @File : topic3.py
# @Software : PyCharm

class Phone:
    name = ''
    sex = ''
    age = 0
    balance = 0
    brand = ''
    battery = 0
    screen = 0.0
    daiji = 0
    jifen = 0

    def note(self):
        print("手机用户", self.name, "，您所话费剩余为", self.balance,
              "元，所拥有的积分为", self.jifen)

    def call(self, a):
        b = self.balance
        d = self.jifen
        t = 18888888888
        if a < 0 or a < 10:
            a1 = b - (1 * a)
            a2 = 1 * a
            d1 = d + (15 * a)
            print("手机号码为", t, "的用户，您的通话时长为", a, "分钟，扣费", a2, "元，话费剩余", a1, "元，积分剩余", d1)
        elif a < 10 or a < 20:
            a1 = b - (0.8 * a)
            a2 = 0.8 * a
            d1 = d + (39 * a)
            print("手机号码为", t, "的用户，您的通话时长为", a, "分钟，扣费", a2, "元，话费剩余", a1, "元，积分剩余", d1)
        elif a > 20:
            a1 = b - (0.65 * a)
            a2 = 0.65 * a
            d1 = d + (48 * a)
            print("手机号码为", t, "的用户，您的通话时长为", a, "分钟，扣费", a2, "元，话费剩余", a1, "元，积分剩余", d1)


i = Phone()
i.name = 'bit'
i.sex = '男'
i.age = 21
i.balance = 233
i.brand = 'APPLE'
i.battery = 4000
i.screen = 6.1
i.daiji = 10
i.jifen = 100
i.note()
i.call(9)
i.call(15)
i.call(70)
